//
//  ProjectsViewController.swift
//  GitOSC-Swift
//
//  Created by 李萍 on 15/12/30.
//  Copyright © 2015年 李萍. All rights reserved.
//

import UIKit

class ProjectsViewController: UIViewController {
    
    var featuredController : ProjectsTableViewController!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.automaticallyAdjustsScrollViewInsets = false
        
        let titleView = TitleViewController(titles: ["推荐项目", "热门项目", "最新项目"],
                                       controllers: [ProjectsTableViewController(projectType: 1),
                                                     ProjectsTableViewController(projectType: 2),
                                                     ProjectsTableViewController(projectType: 3)],
                                            hasNav: true,
                                         hasTabbar: true,
                                      titlesHeight: 35,
                                       buttonWidth: 0,
                                        footHeight: 3)
        
        titleView.buttonBackgroundColor = UIColor.grayColor()
        titleView.buttonSelectedColor = UIColor.blackColor()
        titleView.buttonUnSelectedColor = UIColor.whiteColor()
        
        self.addChildViewController(titleView)
        self.view.addSubview(titleView.view)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
}
